package com.konglz.consumer.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description
 * @Author konglz
 * @Data 2023/5/13 12:29
 */
@Component
public class FanoutMessageListener {
    @RabbitListener(queues = "fanoutQueue1")
    public void fanoutQueue1(String message){
        System.out.println("fanoutQueue1消费者接收到的消息：" + message);
    }

    @RabbitListener(queues = "fanoutQueue2")
    public void fanoutQueue2(String message){
        System.out.println("fanoutQueue2消费者接收到的消息：" + message);
    }
}
